package cn.itcast.farming.entity;

import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

/**
 * 上传请求信息
 */
@Data

public class UploadInfo {


    /**
     *  上传目标存储源，如七牛云、阿里云、hdfs本地实现等
     */
    private String origin;


    /**
     * 上传后资源标识
     */
    private String resourceKey;

    /**
     * 正反面
     */
    private String flag;

    /**
     * 上传凭证
     */
    private String uploadToken;

    /**
     * 上传文件内容
     */
    private MultipartFile file;

    public UploadInfo() {
    }

    public UploadInfo(String origin, String resourceKey, String flag, String uploadToken, MultipartFile file) {
        this.origin = origin;
        this.resourceKey = resourceKey;
        this.flag = flag;
        this.uploadToken = uploadToken;
        this.file = file;
    }

    public String getOrigin() {
        return origin;
    }

    public void setOrigin(String origin) {
        this.origin = origin;
    }

    public String getResourceKey() {
        return resourceKey;
    }

    public void setResourceKey(String resourceKey) {
        this.resourceKey = resourceKey;
    }

    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }

    public String getUploadToken() {
        return uploadToken;
    }

    public void setUploadToken(String uploadToken) {
        this.uploadToken = uploadToken;
    }

    public MultipartFile getFile() {
        return file;
    }

    public void setFile(MultipartFile file) {
        this.file = file;
    }
}
